﻿
/*******************************************************************************************
// ©2009 Microsoft Corporation.  This code is provided under the Microsoft Public License.
*******************************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace ClientBilling
{
    /// <summary>
    /// Represents one of the lawyer's clients.
    /// </summary>
    [Serializable]
    public class Client
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string SipUri { get; set; }
        public string Notes { get; set; }

        private Case _primaryCase;

        public Case PrimaryCase
        {
            get
            {
                if (_primaryCase == null)
                {
                    _primaryCase = Cases[0];
                }
                return _primaryCase;
            }
            set
            {
                _primaryCase = value;
            }
        }

        public List<Case> Cases
        {
            get { return _cases; }
            set { _cases = value; }
        }

        private List<Case> _cases = new List<Case>();
    }
}
